package com.ssyshop.info.utils;

import android.content.Context;
import android.util.Log;

public class UpdateApplication {
	/**
	 * 检查更新状态
	 * 
	 * @param context
	 * @return
	 */
	public static boolean getUpdateInfo(Context context) {

		Config cof = new Config();
		double newCode = cof.getServerVerCode();
		double oldCode = cof.getVerCode(context);
		Log.i("now:",oldCode+"");
		Log.i("new:",newCode+"");

		if (oldCode < newCode) {
			return true;
		} else {
			return false;
		}

	}

	/**
	 * 马上更新
	 * 
	 * @param context
	 */
	public static void newUpdate(Context context) {
		UpdateManager mUpdateManager = new UpdateManager(context);
		mUpdateManager.checkUpdateInfo();
	}
}
